<template>
	<view class="container">
		<view class="help-item flex-x-bet-y-center" v-for="(item,index) in helpList" :key="index" @tap="navTo(item)">
			<text>{{item.name}}</text>
			<u-icon name="arrow-right" size="30"></u-icon>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				helpList: [{
					name: '平台规则',
					type: '',
					url: '/pages/other/platform-rule'
				},{
					name: '担保规则',
					type: 'GUARANTEE_RULES',
				},{
					name: '会员说明',
					type: 'MEMBERSHIP_DESCRIPTION'
				},{
					name: '用户指南',
					type: 'USER_GUIDE'
				},{
					name: '店铺指南',
					type: 'STORE_GUIDE'
				},{
					name: '商家指南',
					type: 'MERCHANT_GUIDE'
				},{
					name: '支付保障',
					type: 'PAYMENT_GUARANTEE'
				},{
					name: '关于平台',
					type: 'ABOUT_THE_PLATFORM'
				}]
			};
		},
		methods:{
			navTo(item){
				if(!item.type){
					this.$myUni.navTo(item.url)
				}else{
					this.$myUni.navTo('/pages/other/richText?from=' + item.type)
				}
			}
		}
	}
</script>

<style lang="scss">
	.help-item{
		margin: 30rpx;
		height: 104rpx;
		background: #FFFFFF;
		border-radius: 19rpx;
		padding: 0 30rpx;
		
		text{
			font-weight: 500;
			font-size: 31rpx;
			color: #333333;
		}
	}
</style>